package com.example.library.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 图书标签实体类
 *
   */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("book_tags")
public class BookTag implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标签ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 标签名称
     */
    @TableField("name")
    private String name;

    /**
     * 标签颜色
     */
    @TableField("color")
    private String color;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 逻辑删除标识
     */
    @TableLogic
    @TableField("deleted")
    private Integer deleted;

    // 预定义标签颜色
    public static final String COLOR_PRIMARY = "#409EFF";
    public static final String COLOR_SUCCESS = "#67C23A";
    public static final String COLOR_WARNING = "#E6A23C";
    public static final String COLOR_DANGER = "#F56C6C";
    public static final String COLOR_INFO = "#909399";

}